// To parse this JSON data, do
//
//     final interiorEntity = interiorEntityFromJson(jsonString);

import 'dart:convert';

class InteriorEntity {
  int id;
  int exteriorId;
  String interiorCode;
  String interiorName;


  InteriorEntity({
    required this.id,
    required this.exteriorId,
    required this.interiorCode,
    required this.interiorName,

  });

  factory InteriorEntity.fromJson(Map<String, dynamic> json) => InteriorEntity(
    id: json["id"],
    exteriorId: json["exteriorId"],
    interiorCode: json["interiorCode"],
    interiorName: json["interiorName"],

  );

  Map<String, dynamic> toJson() => {
    "id": id,
    "exteriorId": exteriorId,
    "interiorCode": interiorCode,
    "interiorName": interiorName,

  };


  InteriorEntity interiorEntityFromJson(String str) => InteriorEntity.fromJson(json.decode(str));

  String interiorEntityToJson(InteriorEntity data) => json.encode(data.toJson());
  static List<Map> exchangeLabelList(List<InteriorEntity> entitys) {
    List<Map> list = [];
    for (InteriorEntity entity in entitys) {
      list.add({"label": entity.interiorName, "value": entity.interiorCode,"id":entity.id});
    }
    return list;
  }
}
